import { intercpt, batch } from './plug'


const n = intercpt((num) => {
    num.forEach((element,i) => {
       num[i] = element + 1 
    });
   
    return num;
}, {
    beforeCall(num) {
        num.forEach((e,i) => {
            num[i] = e * 2
        })
    },
    afterCall(num) {
        let n = 0;
        num.forEach((e) => {
            n += e;
        })
        return n
    }
})
console.log(n([1,2,3]))